package com.hbsi.demo1;

/**
 * @author 程奕红
 * @version 1.0
 */
public class MyThread1 extends Thread{

    public MyThread1(String name){
        super(name);//给线程起个名字
    }

    @java.lang.Override
    public void run() {
        super.run();
        int i=0;
        while(i<=10){
            System.out.println(this.getName()+"...............");
            i++;
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
